<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jQuery.js"></script>
    <script>
        //表单选择器
        $(function(){
           alert($("option:selected").length)
        })
    </script>
</head>
<body>
    <select multiple="multiple" size="7">
    <option>成都</option>
    <option selected>绵阳</option>
    <option selected>自贡</option>
    <option>眉山</option>
    <option >宜昌</option>
    <option>武汉</option>
    <option >广州</option>
    <option>海南</option>
    </select>
</body>
</html>